MkDefinitionList
Node for definition lists.¶
Example: Regular¶
Jinja
Python
- something
-
- A definition
- something_else
- Another definition
Example: Nested markdown¶
Jinja
Info
Nested
- something
-
- A definition
- something_else
-
Info
Nested
Name | Children | Inherits |
---|---|---|
MkContainer mknodes.basenodes.mkcontainer A node containing other MkNodes. |
graph TD
94272695187728["mkdefinitionlist.MkDefinitionList"]
94272697822880["mkcontainer.MkContainer"]
94272697820320["mknode.MkNode"]
94272697777776["node.Node"]
139836355973312["builtins.object"]
94272697822880 --> 94272695187728
94272697820320 --> 94272697822880
94272697777776 --> 94272697820320
139836355973312 --> 94272697777776
/home/runner/work/mknodes/mknodes/mknodes/basenodes/mkdefinitionlist/metadata.toml
[metadata]
icon = "mdi:library"
name = "MkDefinitionList"
[requirements.extension.def_list]
[examples.regular]
title = "Regular"
jinja = """
{{ {"something": "A definition", "something_else": "Another\ndefinition"} | MkDefinitionList }}
"""
[examples.nested]
title = "Nested markdown"
jinja = """
{{ {"something": "A definition", "something_else": ("Nested" | MkAdmonition)} | MkDefinitionList }}
"""
[output.markdown]
template = """
{% for k, v in node.data.items() %}
{{ k }}
: {{ v | string | indent }}
{% endfor %}
"""
[output.rst]
template = """
{% for k, v in node.data.items() %}
{{ k }}
{{ v | string | indent(width=2) }}
{% endfor %}
"""